package com.showsu.editor.session;


import javax.servlet.http.HttpServletRequest;

/**
 * @Author: William
 * @Description: 会话管理接口
 * @Date: Created in 10:50 上午 2024/9/20
 * @Modified By:
 */
public interface ISessionManager {

    /**
     * 根据sessionId获取相应的会话对象（默认touch）
     *
     * @param sessionId
     * @return
     * @throws SessionException
     */
    ISession getSession(HttpServletRequest request) throws SessionException;

    /**
     * 删除会话
     * @param sessionId
     * @throws SessionException
     */
    void deleteSession(String sessionId) throws SessionException;

    /**
     * 根据userId创建相应的会话对象
     *
     * @param userId
     * @return
     * @throws SessionException
     */
    ISession createSession(Long userId) throws SessionException;

}
